package com.thinkTank.oa.entity;

import java.security.Timestamp;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

import com.github.pagehelper.StringUtil;

/***
 * 用户(专家)实体类
 * @author 董力
 * @date 2018-08-09
 */
public class Person implements java.io.Serializable {

	private static final long serialVersionUID = 6571047101563170467L;
	
	/**唯一标识*/
	private String pid; 
	/**专家id*/
	private Integer expertNumber;
	/**
	 * 专家来源  (1网络资源，2线下调研，3会议活动，4个人推荐)
	 */
	@NotNull(message="专家来源不能为空")
	private Integer source;
	/**
	 * 专家类型 (1技术专家，2投资人)
	 */
	@NotNull(message="专家类型不能为空")
	private Integer type;
	/**收集人(录入人)*/
	private String collectPersonId;
	/**录入时间*/
	private String entryTime;
	/**所属领域*/
	@NotEmpty(message="所属领域不能为空")
	private String researchField;
	/**0国内 1国外*/
	@NotNull(message="国家不能为空")
	private Integer domesticOrForeign;
	/**所在地区*/
	@NotEmpty(message="所在地区不能为空")
	private String area;
	/**人才级别*/
	private String talentLevel;
	/**姓名*/
	@NotEmpty(message="姓名不能为空")
	private String name;
	/**
	 * 性别 (0男，1女)
	 */
	private Integer sex;
	/**出生日期*/
	private String birth;
	/**籍贯*/
	private String birthPlace;
	/**附件*/
	private String annex;
	/**最高学历*/
	private String maxEducation;
	/**毕业院校及所学专业*/
	private String schoolAndMajor;
	/**单位*/
	private String unit;
	/**职务(职称)*/
	private String title;
	/**专业领域*/
	private String professionaField;
	/**固定电话*/
	private String fixedPhone;
	/**手机*/
	private String tell;
	/**邮箱*/
	private String email;
	/**微信*/
	private String wechat;
	/**其他联系方式*/
	private String otherContact;
	/**教育背景*/
	private String education;
	/**工作经历*/
	private String workExp;
	/**荣誉奖励*/
	private String honorAward;
	/**科技成果*/
	private String technica;
	/**备注1*/
	private String remark1;
	/**备注2*/
	private String remark2;
	/**备注3*/
	private String remark3;
	/**备注4*/
	private String remark4;
	/**备注5*/
	private String remark5;
	/**引用信息来源链接 */
	private String website;
	/**个人简介*/
	private String personInfo;
	/**查询数据作为查询条件用*/
  	private String[] notInCustomerIds;
	/**数据字典*/
	private Dictiontry dictiontry;
	private Integer talentLevelNumber;
	private Integer researchFieldNumber;
	/**一个十进制数字，保存到数据库就保存这个数字*/
    private Integer talentLevelInteger;
    /**同上*/
    private Integer researchFieldInteger;
    /**仅用来详情中展示数据*/
    private String sourceWorth;
	private String typeWorth;
	private String areaWorth;
	private String retireStatusWorth;
	/**用于专家管理页面检索所属领域时判断‘且’、‘或’两种选择*/
	private Integer a;
	/**用于专家管理页面检索人才级别时判断‘且’、‘或’两种选择*/
	private Integer b;
	/**专家管理页面（手机/固定电话）*/
	@SuppressWarnings("unused")
	private String jia;
	/**离退休状态，如已故、退休或因个人问题受处罚中*/
	private Integer retireStatus;
	/**最新更新时间*/
    private String updateTime; 
    /**定义一个整型表示用户剩余的下载量*/
    private Integer pers;
    /**用来展示录入人姓名*/
    private String collectPersonName;
    private int number1;                 //专家区间批量下载的参数1
    private int number2;                 //专家区间批量下载的参数2
    private int number3;                 //专家区间批量下载的参数3
	
    //列表页面开始不显示需求联系人和客户联系人
    private List<Integer> typeList;
	
	/**构造函数*/
	public Person() {
    }
    public Person(@NotNull(message = "非空") String name) {
        this.name = name;
    }
    
    
    /**生成的get、set方法*/
    public String getPid() {
		return pid;
	}
	public void setPid(String pid) {
		this.pid = pid;
	}
	public Integer getExpertNumber() {
		return expertNumber;
	}
	public void setExpertNumber(Integer expertNumber) {
		this.expertNumber = expertNumber;
	}
	public Integer getSource() {
		return source;
	}
	public void setSource(Integer source) {
		this.source = source;
	}
	public Integer getType() {
		return type;
	}
	public void setType(Integer type) {
		this.type = type;
	}
	public String getCollectPersonId() {
        return collectPersonId;
    }
    public void setCollectPersonId(String collectPersonId) {
        this.collectPersonId = collectPersonId;
    }
    public String getEntryTime() {
		return entryTime;
	}
	public void setEntryTime(String entryTime) {
		this.entryTime = entryTime;
	}
	public String getResearchField() {
		return researchField;
	}
	public void setResearchField(String researchField) {
		this.researchField = researchField;
	}
	public Integer getDomesticOrForeign() {
		return domesticOrForeign;
	}
	public void setDomesticOrForeign(Integer domesticOrForeign) {
		this.domesticOrForeign = domesticOrForeign;
	}
	public String getArea() {
        return area;
    }
    public void setArea(String area) {
        this.area = area;
    }
    public String getTalentLevel() {
		return talentLevel;
	}
	public void setTalentLevel(String talentLevel) {
		this.talentLevel = talentLevel;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Integer getSex() {
		return sex;
	}
	public void setSex(Integer sex) {
		this.sex = sex;
	}
	public String getBirth() {
		return birth;
	}
	public void setBirth(String birth) {
		this.birth = birth;
	}
	public String getBirthPlace() {
		return birthPlace;
	}
	public void setBirthPlace(String birthPlace) {
		this.birthPlace = birthPlace;
	}
	public String getAnnex() {
		return annex;
	}
	public void setAnnex(String annex) {
		this.annex = annex;
	}
	public String getMaxEducation() {
		return maxEducation;
	}
	public void setMaxEducation(String maxEducation) {
		this.maxEducation = maxEducation;
	}
	public String getSchoolAndMajor() {
		return schoolAndMajor;
	}
	public void setSchoolAndMajor(String schoolAndMajor) {
		this.schoolAndMajor = schoolAndMajor;
	}
	public String getUnit() {
		return unit;
	}
	public void setUnit(String unit) {
		this.unit = unit;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getProfessionaField() {
		return professionaField;
	}
	public void setProfessionaField(String professionaField) {
		this.professionaField = professionaField;
	}
	public String getFixedPhone() {
		return fixedPhone;
	}
	public void setFixedPhone(String fixedPhone) {
		this.fixedPhone = fixedPhone;
	}
	public String getTell() {
		return tell;
	}
	public void setTell(String tell) {
		this.tell = tell;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getWechat() {
		return wechat;
	}
	public void setWechat(String wechat) {
		this.wechat = wechat;
	}
	public String getOtherContact() {
		return otherContact;
	}
	public void setOtherContact(String otherContact) {
		this.otherContact = otherContact;
	}
	public String getEducation() {
		return education;
	}
	public void setEducation(String education) {
		this.education = education;
	}
	public String getWorkExp() {
		return workExp;
	}
	public void setWorkExp(String workExp) {
		this.workExp = workExp;
	}
	public String getHonorAward() {
		return honorAward;
	}
	public void setHonorAward(String honorAward) {
		this.honorAward = honorAward;
	}
	public String getTechnica() {
		return technica;
	}
	public void setTechnica(String technica) {
		this.technica = technica;
	}
	public String getRemark1() {
		return remark1;
	}
	public void setRemark1(String remark1) {
		this.remark1 = remark1;
	}
	public String getRemark2() {
		return remark2;
	}
	public void setRemark2(String remark2) {
		this.remark2 = remark2;
	}
	public String getRemark3() {
		return remark3;
	}
	public void setRemark3(String remark3) {
		this.remark3 = remark3;
	}
	public String getRemark4() {
		return remark4;
	}
	public void setRemark4(String remark4) {
		this.remark4 = remark4;
	}
	public String getRemark5() {
		return remark5;
	}
	public void setRemark5(String remark5) {
		this.remark5 = remark5;
	}
	public Dictiontry getDictiontry() {
		return dictiontry;
	}
	public void setDictiontry(Dictiontry dictiontry) {
		this.dictiontry = dictiontry;
	}
    public Integer getTalentLevelNumber() {
		return talentLevelNumber;
	}
	public void setTalentLevelNumber(Integer talentLevelNumber) {
		this.talentLevelNumber = talentLevelNumber;
	}
	public Integer getResearchFieldNumber() {
		return researchFieldNumber;
	}
	public void setResearchFieldNumber(Integer researchFieldNumber) {
		this.researchFieldNumber = researchFieldNumber;
	}
	public Integer getTalentLevelInteger() {
        return talentLevelInteger;
    }
    public void setTalentLevelInteger(Integer talentLevelInteger) {
        this.talentLevelInteger = talentLevelInteger;
    }
    public Integer getResearchFieldInteger() {
        return researchFieldInteger;
    }
    public void setResearchFieldInteger(Integer researchFieldInteger) {
        this.researchFieldInteger = researchFieldInteger;
    }
	public String[] getNotInCustomerIds() {
		return notInCustomerIds;
	}
	public void setNotInCustomerIds(String[] notInCustomerIds) {
		this.notInCustomerIds = notInCustomerIds;
	}
	public String getSourceWorth() {
		return sourceWorth;
	}
	public void setSourceWorth(String sourceWorth) {
		this.sourceWorth = sourceWorth;
	}
	public String getTypeWorth() {
		return typeWorth;
	}
	public void setTypeWorth(String typeWorth) {
		this.typeWorth = typeWorth;
	}
	public String getAreaWorth() {
		return areaWorth;
	}
	public void setAreaWorth(String areaWorth) {
		this.areaWorth = areaWorth;
	}
	public String getWebsite() {
		return website;
	}
	public void setWebsite(String website) {
		this.website = website;
	}
	public String getPersonInfo() {
		return personInfo;
	}
	public void setPersonInfo(String personInfo) {
		this.personInfo = personInfo;
	}
	public Integer getA() {
		return a;
	}
	public void setA(Integer a) {
		this.a = a;
	}
	public Integer getB() {
		return b;
	}
	public void setB(Integer b) {
		this.b = b;
	}
	/*public String getJia() {
		if (tell != null && fixedPhone == null) {
			jia = tell;
		}
		if(tell == null && fixedPhone != null){
			jia = fixedPhone;
		}
		if(tell != null && fixedPhone != null){
			jia = tell +"/"+ fixedPhone;
		}
		if(tell == null && fixedPhone == null){
			jia = null;
		}
		return jia;
	}*/
	public String getJia() {
		return jia = Stream.of(tell, fixedPhone).filter(StringUtil::isNotEmpty).collect(Collectors.joining("/"));
	}
	public void setJia(String jia) {
		this.jia = jia;
	}	
	public Integer getRetireStatus() {
		return retireStatus;
	}
	public void setRetireStatus(Integer retireStatus) {
		this.retireStatus = retireStatus;
	}
	public String getUpdateTime() {
		return updateTime;
	}
	public void setUpdateTime(String updateTime) {
		this.updateTime = updateTime;
	}
	public String getRetireStatusWorth() {
		return retireStatusWorth;
	}
	public void setRetireStatusWorth(String retireStatusWorth) {
		this.retireStatusWorth = retireStatusWorth;
	}
	public Integer getPers() {
		return pers;
	}
	public void setPers(Integer pers) {
		this.pers = pers;
	}
	public String getCollectPersonName() {
		return collectPersonName;
	}
	public void setCollectPersonName(String collectPersonName) {
		this.collectPersonName = collectPersonName;
	}
	public int getNumber1() {
		return number1;
	}
	public void setNumber1(int number1) {
		this.number1 = number1;
	}
	public int getNumber2() {
		return number2;
	}
	public void setNumber2(int number2) {
		this.number2 = number2;
	}
	public int getNumber3() {
		return number3;
	}
	public void setNumber3(int number3) {
		this.number3 = number3;
	}
	public List<Integer> getTypeList() {
		return typeList;
	}
	public void setTypeList(List<Integer> typeList) {
		this.typeList = typeList;
	}
	/**重写toString*/
	@Override
	public String toString() {
		return "Person [pid=" + pid + ", expertNumber=" + expertNumber + ", source=" + source + ", type=" + type
				+ ", collectPersonId=" + collectPersonId + ", entryTime=" + entryTime + ", researchField="
				+ researchField + ", area=" + area + ", talentLevel=" + talentLevel + ", name=" + name + ", sex=" + sex
				+ ", birth=" + birth + ", birthPlace=" + birthPlace + ", annex=" + annex + ", maxEducation="
				+ maxEducation + ", schoolAndMajor=" + schoolAndMajor + ", unit=" + unit + ", title=" + title
				+ ", professionaField=" + professionaField + ", fixedPhone=" + fixedPhone + ", tell=" + tell
				+ ", email=" + email + ", wechat=" + wechat + ", otherContact=" + otherContact + ", education="
				+ education + ", workExp=" + workExp + ", honorAward=" + honorAward + ", technica=" + technica
				+ ", remark1=" + remark1 + ", remark2=" + remark2 + ", remark3=" + remark3 + ", remark4=" + remark4
				+ ", remark5=" + remark5 + ", dictiontry=" + dictiontry + "]";
	}
	
}
